P in K
最も基本的なMapped Typesの形
{[P in K]: T}
Kは、union型 (ts)
code:TypeScript
type T = { key in 'x' | 'y': number }; // {x: number; y: number}